intercepts a small part of the HTML code in the instance, the detailed XHTML code can be see the page demo source code. It is worth mentioning that I gave the label a "required" class style, and the following will refer to its role.
4, the application of validation plug-ins
How to invoke the validation plug-in:
code is as follows
copy code
: Verification Code AJAX authentication.How to use:1. Prepare jquery and Jquery.validate plugins "text/javascript" src="js/ Jquery.validate.js"2. Prepare CSS StylePage style I no longer detail, you can write a style, you can also see the demo page source code. The key style to emphasize here is to display the style of the validation information:Label.error{color: #ea5200; margin-left:4px; padding:0px 20px ; Background:url (Images/unchecked0 } label.
When generating a form from a form widget at the view level, field can only exist in the database, for example: use yii\helpers\html; Use Yii\widgets\activeform; Use Yii\captcha\captcha;
' Sign-form ', ' Options ' =>[' action ' =
validate.jsFirst of all, we need to download a copy of the Validate.js file, which can be downloaded to the jquery website or csdn. After downloading, create a new HTML file, and then successively introduce the Jquery.js file and validate.js into the HTML code, I'll create a new file named Formcheck.html, as shown in:here I introduced the layui.css style file for a good look at the
PHP VERSION = 5.3.10First, about $_requestPHP documentation Instructions for $_request:describes an array that contains $_get,$_post and $_cookie by default. Update log version description 5.3. 0 introduce Request_order. This directive affects the content of $_request. 4.3. 0 $_files information is removed from the $_request. 4.1. 0 Introduce $_request.In PHP 5.3 or later, the request_order default setting in PHP.ini is:Request_order = "GP"GP is GET and POST, and does not cont
thinkphp form Auto-validate function, thinkphp form verification
Last night, our boss asked me to get the form of automatic verification function, sorrow for a long day borrowed a lot of knowledge of the official website, just out, eh, to share my own results!
Thinkphp in the model base class for us to define the function and regular expression of auto-
Article Introduction: easy to use jquery form verification plug-in--jquery.validate.js.
Jquery.validate.js is a validation plug-in for jquery, and with the advantage of jquery, we can quickly validate some of the common inputs and expand our own authentication methods. Please download the necessary jquery plugins before using: Jquery-1.4.2.min.js and Jquery.validate.min.js.
The following shows
order to demonstrate, the user name data is written directly on the service side, the real application is from the database out of the user name data, and to receive the client data comparison.2. When verifying the checkbox and the radio control, the validation information does not appear behind the final control text, but directly behind the first control, which does not meet our requirements.
The workaround is to append the following code to val
in the "left-by-order" step.Formtowizard plugin»Sliding labels-jquery form plugin
Sliding labels-jquery form plugin»Toggleval
Toggleval will allow you to fill in form text fields in different ways (in some different ways), and automatically switch to the default value when receiving and losing focus.Toggleval»Jquery alphanumeric
Jquery Alphanumeric is a javas
datatype= "M |E, *4-18 |/\w{3,6}/i | /^validform\.rjboy\.cn$/",This expression means: can be a mobile phone number, or an email address, but the character length must be 4 to 18 bits, or 3 to 6 letters, not case-sensitive, or input validform.rjboy.cn, case-sensitive. Here "," separates the equivalent of "" in the logical operation; Separating "| |" In the same logical operation ; bracket arithmetic is not supported.NullmsgWhen the form element value
JQuery form plugin jquery. form. js and jquery form validation plugin
Overview
JQuery Form Plugin allows you to easily upgrade forms submitted in HTML Form to forms submitted using AJAX
Jquery:Content Body stitching (you can directly splice element nodes and content nodes)jquery implementation:Programme 1:a.append (B); = = B.appendto (A); A behind the stitching BProgramme 2:a.prepend (B); = = B.prependto (A); The first insertion of a text is BText () compared to HTML ():1. The same point:can set or get content2. Different points:When fetched, the HTML () gets all the content body: Label +
Bootstrap Form Verification formValidation implements form dynamic verification, and validation Form Verification
Add input dynamically and add new verification methods dynamically!
Init status:
Click "+:
After verification:
Knowledge point:
1 first go to the official website download: http://formvalidation.io/
2. I
. The function of the implementation is to help users write all the information related to the validation data into the class attribute, easy to manage.
There are several steps we can take to achieve this requirement.• Introduction of a new plugin jquery.metadata.js• Change the switch that invokes the validation form:
$ (function () {
$ ("#form_id"). Va
TP data validation in two ways, one is static, one is dynamic, the previous form verification is JS write, here can also use the TP framework validation. However, the comparison between the two is better than JS verification, because the TP framework validation will run the background code, so that the speed and effici
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.